<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增服务商划拨、撤销机具申请信息')" />
    <th:block th:include="include :: jasny-bootstrap-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-pos-add">
            <input type="hidden" name="applyType" value="0">
            <div class="form-group">
                <label class="col-sm-3 control-label  is-required">服务商编号：</label>
                <div class="col-sm-8">
                    <input name="xagentNum" onclick="selectAgent()" readonly id="xagentNum" type="text" class="form-control" required>
                    <i class="fa fa-search" style="margin-top: -22px;margin-right:3px;float:right;"></i>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">服务商名称：</label>
                <div class="col-sm-8">
                    <input name="xagentName" class="form-control" id="xagentName" type="text" required readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">申请数量：</label>
                <div class="col-sm-8">
                    <input name="applyNum" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">欠款：</label>
                <div class="col-sm-8">
                    <input name="qmoney" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">机具类型：</label>
                <div class="col-sm-8">
                    <select name="posType" readonly  class="form-control" th:with="type=${@dict.getType('terminal_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                                th:selected = "${dict.dictValue eq agentApplyPos?.posType}" ></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: jasny-bootstrap-js" />
    <script th:inline="javascript">
        var prefix = ctx + "terminal/pos"
        $("#form-pos-add").validate({
            focusCleanup: true
        });

        function selectAgent() {
            var url = prefix+"/selectAgentInfo";
            $.modal.open("选择服务商" , url, '700');
        }

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/addRevoke", $('#form-model-add').serialize());
            }
        }
    </script>
</body>
</html>